"use strict";

const list = [
  {
    name: "root",
    code: "root",
    remark: "root用户",
    status: false,
    createdAt: new Date(),
    updatedAt: new Date(),
  },
  {
    name: "admin",
    code: "admin",
    remark: "admin用户",
    status: false,
    createdAt: new Date(),
    updatedAt: new Date(),
  },
  {
    name: "general",
    code: "general",
    remark: "general用户",
    status: false,
    createdAt: new Date(),
    updatedAt: new Date(),
  },
];

/** @type {import('sequelize-cli').Migration} */
module.exports = {
  async up(queryInterface, Sequelize) {
    /**
     * Add seed commands here.
     *
     * Example:
     * await queryInterface.bulkInsert('People', [{
     *   name: 'John Doe',
     *   isBetaMember: false
     * }], {});
     */
    await queryInterface.bulkInsert("Roles", list, {});
  },

  async down(queryInterface, Sequelize) {
    /**
     * Add commands to revert seed here.
     *
     * Example:
     * await queryInterface.bulkDelete('People', null, {});
     */
    await queryInterface.bulkDelete("Roles", null, {});
  },
};
